C-SSAPRE: Eliminating redundancy over copies

نویسندگان

  • Tom Murphy
  • Brendan McMahan
چکیده

Partial Redundancy Elimination (PRE) is an optimization that prevents, where possible, the re-computation of an expression along some paths in a program. PRE is general enough to automatically implement loop-invariant code hoisting and global common sub-expression elimination. PRE appears to be especially beneficial for functional programs, where the class of expressions that may be moved is much richer: in addition to arithmetic and memory loads, we may also move and coalesce projections from tuples, calls to total functions, and even allocations of persistent values. The SSAPRE [5, 7] algorithm implements Partial Redundancy Elimination for programs in a static single assignment (SSA) intermediate representation (IR). However, the algorithms makes several assumptions about the intermediate representation that do not hold in all cases. In particular, they do not hold for the SSA IR of MLton [2], a high performance whole-program compiler for Standard ML [8]. We introduce a new PRE algorithm, CSSAPRE, which finds PRE optimization across copies, detecting redundencies not possible with the original SSAPRE algorithm. Our algorithm can be applied directly to MLton’s IR, which lacks explicit copies. We begin by describing the MLton SSA IR and its differences from what we will call “standard” SSA, as given by Cytron et al. [6]. This provides a concrete framework for our discussion of our generalization of the SSAPRE algorithm. We then provide detailed pseudocode for the pre-pass that we use before invoking a modified version of SSAPRE. Finally, we discuss our conclusions, important open questions, and potential ideas for future work. An appendix gives an improved pre-pass algorithm.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Strength Reduction via SSAPRE

We present techniques that allow strength reduction to be performed concurrently with partial redundancy elimination in the SSAPRE framework. By sharing the characteristics inherent to SSAPRE, the resulting strength reduction algorithm exhibits many interesting attributes. We compare various aspects of the new strength reduction algorithm with previous strength reduction algorithms. We also out...

متن کامل

Register Promotion by Sparse Partial Redundancy Elimination

An algorithm for register promotion is presented based on the observation that the circumstances for promoting a memory location's value to register coincide with situations where the program exhibits partial redundancy between accesses to the memory location. The recent SSAPRE algorithm for eliminating partial redundancy using a sparse SSA representation forms the foundation for the present al...

متن کامل

Anticipation-based partial redundancy elimination for static single assignment form

Partial redundancy elimination (PRE) is a program transformation that identifies and eliminates expressions that are redundant on at least one (but not necessarily all) execution paths of a program without increasing any path length. Chow, Kennedy, et al. devised an algorithm (SSAPRE) for performing partial redundancy elimination on intermediate representation in static single assignment (SSA) ...

متن کامل

Partial Redundancy Elimination in SSA

The SSAPRE algorithm for performing partial redundancy elimination based entirely on SSA form is presented. The algorithm is formulated based on a new conceptual framework, the fac-tored redundancy graph, for analyzing redundancy, and represents the rst sparse approach to the classical problem of partial redundancy elimination. At the same time, it provides new perspectives on the problem and o...

متن کامل

Evolutionary preservation of redundant duplicated genes.

Gene duplication events produce both perfect and imperfect copies of genes. Perfect copies are said to be functionally redundant when knockout of one gene produces no 'scoreable', phenotypic effects. Preserving identical, duplicate copies of genes is problematic as all copies are prone to accumulate neutral mutations as pseudogenes, or more rarely, evolve into new genes with novel functions. We...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003